package cn.com.blueInfo.bpm.number.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.number.entity.NumberLog;
import cn.com.blueInfo.bpm.number.request.NumberLogDTO;
import cn.com.blueInfo.bpm.number.response.NumberLogVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 编号规则日志表 对象转换
 * @author suxch
 * @since 2025-08-31 16:13:48
 */
@Mapper(componentModel = "spring")
public interface NumberLogConvert
        extends BaseConvert<NumberLog, NumberLogDTO, NumberLogVO> {

    NumberLog dtoToEntity(NumberLogDTO dto);

    NumberLog dtoToEntity(NumberLogDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    NumberLogVO entityToVO(NumberLog entity);

}